home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 2
/
Meeting Pearls Vol. II (1995)(GTI - Schatztruhe)[!].iso
/
Pearls
/
arc
/
XFH
/
src
/
Lib
/
dosalloc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-12-15
|
460b
|
31 lines
/* 'dosalloc.c' - dos-type allocation/deallocation. */
#include <exec/types.h>
#include <exec/memory.h>
#include <proto/exec.h>
#include <dossupport.h>
void *dosalloc(long size){
long *mem;
if(!(mem=AllocMem(size+=4, MEMF_PUBLIC|MEMF_CLEAR )))
return 0L;
*mem++ = size;
return mem;
}
void dosfree(void *mem){
register long *mem2=mem;
if(mem2){
--mem2;
FreeMem(mem2, *mem2);
}
}
/* End of dosalloc.c */